<?php
session_start();
include_once('../model/DealerDAO.php');

$result = "false";

if(isset($_POST['emailre']) && isset($_POST['passre'])) {
	$email = $_POST['emailre'];
	$pass = md5($_POST['passre']);
	$arradealer = getDealerLogin($email, $pass);
	
	if(count($arradealer) > 0) {
		if($arradealer[0][1] == 1) {
			if($arradealer[0][2] == 0) {
				$_SESSION['taichinhondealer'] = $email;
				$result = "true";
			} else {
				$result = "lock";
			}
		} else {
			$result = "acti";
		}
	}
}

echo json_encode($result);
?>